//==========================================================================
/**
* @file	  : RenderableObject.h
* @author : cpzhang <chengpengzhang@gmail.com>
* created : 2010-5-7   19:55
* purpose : 
*/
//==========================================================================

#ifndef __RenderableObject_h__
#define __RenderableObject_h__

#include "Common.h"

//
namespace Euclid
{
	class RenderableObject
	{
	public:
		/// Constructor
        RenderableObject();

		/// Named constructor
		RenderableObject(const std::string& name);
        /** Virtual destructor - read Scott Meyers if you don't know why this is needed.
        */
        virtual ~RenderableObject();

		//
	public:
		//
		virtual bool update();
		virtual bool create() = 0;
		virtual void destroy();

		virtual void attachNode(Node* node);
		virtual void preRender();
		virtual void postRender();
		//
		virtual void render() = 0;

		//
		std::string getName() const;

		//
		void setName(const std::string& name);

		//
		void setType(std::string& type);
		const std::string& getType() const;

		//
	protected:
		//	Name of this object
		std::string			_name;

		//	Mesh ? Manual ? Light ? Camera ?
		std::string			_type;

		//	SceneManager holding this object (if applicable)
		ISceneManager*		_sceneManager;

		//
		Node*				_currentNode;

		IRenderSystem*		_renderSystem;
	};
}

#endif // __RenderableObject_h__
 
